Hello,
I am trying to deploy rundeck on a single host running on docker with the underlying OS being AlmaLinux 9.x (with SELinux enforcing and firewall turned on) or Ubuntu 22.x (firewall disabled). I have gotten the basic image to work but am trying to get this to work with postgres 14 and nginx:stable or latest. Also I am using portainer on top of docker on both iterations and this is the community edition.
Every time I deploy it I either have an issue with copying the nginx file (it mangles the host location) or it work but when I browse to the IP address and log in, it then redirects to localhost because of the ENV variable in the docker-compose file. I need some assistance on what to change to make this work. Below is my docker-compose.yml
version: '3.8'
services:
rundeck:
image: ${RUNDECK_IMAGE:-rundeck/rundeck:SNAPSHOT}
links:
- postgres
environment:
RUNDECK_DATABASE_DRIVER: org.postgresql.Driver
RUNDECK_DATABASE_USERNAME: rundeck
RUNDECK_DATABASE_PASSWORD: rundeck
RUNDECK_DATABASE_URL: jdbc:postgresql://postgres/rundeck?autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
RUNDECK_GRAILS_URL: http://localhost:4440
RUNDECK_SERVER_ADDRESS: 0.0.0.0
RUNDECK_SERVER_FORWARDED: 'true'
volumes:
- rundeck-data:/home/rundeck
ports:
- 4440:4440
nginx:
image: nginx:stable
links:
- rundeck
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
postgres:
image: postgres:14
expose:
- 5432
environment:
- POSTGRES_DB=rundeck
- POSTGRES_USER=rundeck
- POSTGRES_PASSWORD=rundeck
volumes:
- dbdata:/var/lib/postgresql/data
volumes:
dbdata:
rundeck-data:
Here is the updated docker-compose.yml
version: ‘3.8’
services:
rundeck:
image: ${RUNDECK_IMAGE:-rundeck/rundeck:SNAPSHOT}
links:
- postgres
environment:
RUNDECK_DATABASE_DRIVER: org.postgresql.Driver
RUNDECK_DATABASE_USERNAME: rundeck
RUNDECK_DATABASE_PASSWORD: rundeck
RUNDECK_DATABASE_URL: jdbc:postgresql://postgres/rundeck?autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
RUNDECK_SERVER_ADDRESS: 0.0.0.0
RUNDECK_SERVER_FORWARDED: 'true'
volumes:
- rundeck-data:/home/rundeck
ports:
- 4440:4440
nginx:
image: nginx
links:
- rundeck
volumes:
- /home/ubuntu/asm_rundeck_docker_pgsql_nginx/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- 80:80
postgres:
image: postgres
expose:
- 5432
environment:
- POSTGRES_DB=rundeck
- POSTGRES_USER=rundeck
- POSTGRES_PASSWORD=rundeck
volumes:
- dbdata:/var/lib/postgresql/data
volumes:
dbdata:
rundeck-data:
What am I doing wrong?